//对象字面量
const bar = "345";
const obj = {
  foo: 123,
  method1: function () {
    console.log("method1");
  },
};
const bar = "345";
const obj = {
  foo: 123,
  bar,
  method1() {
    console.log("method1");
  },
  [bar]: 123,
};
